An oil formation is damaged when a well is less productive than predicted by an analysis of the well test results. The formation damaging mechanisms depend on the type of reactions produced between the well fluids, the rock formation fluids under working conditions (pressure and temperature of the layer and the mud). Deterioration of the productive formation close to the well is due to harmful interaction between the formation fluids and foreign fluids introduced. If the well's fluids are revealed to be responsible for the damage, chemical treatment is then necessary to restore the reservoir's characteristics. This must allow the external and/or internal cake to be destroyed and the damaged area near the well to be cleaned. This treatment may or may not be combined with matrix treatment of acid type.
In general, oil-based well fluids generate little filtrate, have good rheological properties and form a thin, permeable cake. However, they contain chemical additives (surfactants) intended to emulsify the water in the form of droplets inside the continuous oil-based phase and to render oil-wettable the solid particles used as a weightening or viscosification agent. These surfactants in excess concentration in the fluid to maintain the inverse emulsion's stability can penetrate the formation with the filtrate.
Three types of damage can in particular be envisaged in the case of oil-based fluids:                the formation of an emulsion within the reservoir, resulting from interactions between the oil-based mud's filtrate (which mainly contains oil and surfactants) and the reservoir fluids (brine and oil). The excess emulsifiers introduced into the formulation can enter into contact with the formation. Now, significant shearing on constriction of the pores in the presence of emulsifier can lead to the formation of a very stable and viscous emulsion resulting in a reduction in the effective mobility of the hydrocarbons present;        deterioration of the initial wettability of the reservoir rock. Emulsifying products generally transform rock which is initially water-wettable into an intermediate state of wettability, or even oil-wettable, which can result in a modification in the relative permeability to oil and therefore reduce the oil's mobility; and        the deposit of fine mobile particles in the pores (reduction in absolute permeability).        
The chemical composition of the filtration cake must be carefully considered when treatment fluids are designed. The cake is mainly constituted by droplets of emulsified water, which act as colloidal particles and combine with the solid particles in suspension in the fluid to form a cake. The stability of the emulsion, the type and nature of the solids influence both the fluid losses and the cake's filtration properties. The choice of the treatment product must take into account the parameters required to wash the cake and clean out the formation.
The treatment envisaged relates to:                dissolving the weightening agents present in the cake and        attacking the additives contained in the filtrate.        
The treatment must therefore be adapted to the type of mud used. The main parameters that should be considered are:                the type and extent of the damage;        the reservoir's characteristics (porosity and permeability);        the type of formation (type of rock and solubility in acid);        possible contaminants (water, muds—water-based mud and oil-based mud—cements, bacteria);        compatibility of treatment fluid with contaminants;        bottomhole pressure and temperature;        treatment time; and        physical limits of well equipment.        